<template>
  <div class="not-found">
    <div class="not-found-container">
      <div class="error-code">404</div>
      <div class="error-icon">
        <i class="fas fa-exclamation-triangle"></i>
      </div>
      <h1 class="error-title">页面未找到</h1>
      <div class="error-message">抱歉，您访问的页面不存在或已被移除</div>
      <div class="error-actions">
        <button class="btn-primary" @click="goHome">返回首页</button>
        <button class="btn-secondary" @click="goBack">返回上一页</button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'NotFound',
  methods: {
    // 返回首页
    goHome() {
      this.$router.push('/new/home')
    },
    
    // 返回上一页
    goBack() {
      this.$router.back()
    }
  }
}
</script>

<style scoped>
.not-found {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 40px 20px;
  background-color: #f5f5f5;
}

.not-found-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: 40px;
  text-align: center;
  max-width: 600px;
  width: 100%;
  position: relative;
}

.error-code {
  position: absolute;
  font-size: 180px;
  font-weight: bold;
  color: rgba(0, 0, 0, 0.03);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
}

.error-icon {
  font-size: 64px;
  color: #f44336;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.error-title {
  font-size: 28px;
  color: #333;
  margin: 0 0 16px 0;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.error-message {
  font-size: 16px;
  color: #666;
  margin-bottom: 32px;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.btn-primary {
  background-color: #1976d2;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-primary:hover {
  background-color: #1565c0;
}

.btn-secondary {
  background-color: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-secondary:hover {
  background-color: #e0e0e0;
}

@media (max-width: 600px) {
  .not-found-container {
    padding: 30px 20px;
  }
  
  .error-code {
    font-size: 120px;
  }
  
  .error-actions {
    flex-direction: column;
    gap: 12px;
  }
  
  .btn-primary, .btn-secondary {
    width: 100%;
  }
}
</style> 